package com.func.springsecuritydemo.pojo;

public class RespObj {
	
	private Integer code;
	
	private String msg;
	
	private Object obj;
	
	public RespObj(){
		
	}
	
	
	public RespObj(Integer code, String msg, Object obj) {
		super();
		this.code = code;
		this.msg = msg;
		this.obj = obj;
	}



	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getObj() {
		return obj;
	}

	public void setObj(Object obj) {
		this.obj = obj;
	}
	
	public static RespObj success(String msg){
		return new RespObj(0, msg,null);
	}
	
	public static RespObj success(String msg,Object obj){
		return new RespObj(0, msg, obj);
	}
	
	public static RespObj error(Integer code,String msg){
		return new RespObj(code, msg, null);
	}
	
	public static RespObj error(Integer code,String msg,Object obj){
		return new RespObj(code, msg, obj);
	}

}
